package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DcInfImprenta generated by hbm2java
 */
@Entity
@Table(name = "DC_INF_IMPRENTA", schema = "EDADEPUDOC")
public class DcInfImprenta implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -38083473198172517L;
	private Long iindice;
	private EdDeclaraciones edDeclaraciones;
	private TbUnidadRecep tbUnidadRecep;
	private String ctipoDec;
	private Date fhmodifica;
	private Set<DcInfDetalle> dcInfDetalles = new HashSet<DcInfDetalle>(0);

	public DcInfImprenta() {
	}

	public DcInfImprenta(Long iindice, EdDeclaraciones edDeclaraciones,
			TbUnidadRecep tbUnidadRecep, Date fhmodifica) {
		this.iindice = iindice;
		this.edDeclaraciones = edDeclaraciones;
		this.tbUnidadRecep = tbUnidadRecep;
		this.fhmodifica = fhmodifica;
	}

	public DcInfImprenta(Long iindice, EdDeclaraciones edDeclaraciones,
			TbUnidadRecep tbUnidadRecep, String ctipoDec, Date fhmodifica,
			Set<DcInfDetalle> dcInfDetalles) {
		this.iindice = iindice;
		this.edDeclaraciones = edDeclaraciones;
		this.tbUnidadRecep = tbUnidadRecep;
		this.ctipoDec = ctipoDec;
		this.fhmodifica = fhmodifica;
		this.dcInfDetalles = dcInfDetalles;
	}

	@Id
	@Column(name = "I_INDICE", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getIindice() {
		return this.iindice;
	}

	public void setIindice(Long iindice) {
		this.iindice = iindice;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_INDICE", unique = true, nullable = false, insertable = false, updatable = false)
	public EdDeclaraciones getEdDeclaraciones() {
		return this.edDeclaraciones;
	}

	public void setEdDeclaraciones(EdDeclaraciones edDeclaraciones) {
		this.edDeclaraciones = edDeclaraciones;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_UNIDAD_RECEP", nullable = false)
	public TbUnidadRecep getTbUnidadRecep() {
		return this.tbUnidadRecep;
	}

	public void setTbUnidadRecep(TbUnidadRecep tbUnidadRecep) {
		this.tbUnidadRecep = tbUnidadRecep;
	}

	@Column(name = "C_TIPO_DEC", length = 1)
	public String getCtipoDec() {
		return this.ctipoDec;
	}

	public void setCtipoDec(String ctipoDec) {
		this.ctipoDec = ctipoDec;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICA", nullable = false, length = 7)
	public Date getFhmodifica() {
		return this.fhmodifica;
	}

	public void setFhmodifica(Date fhmodifica) {
		this.fhmodifica = fhmodifica;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dcInfImprenta")
	public Set<DcInfDetalle> getDcInfDetalles() {
		return this.dcInfDetalles;
	}

	public void setDcInfDetalles(Set<DcInfDetalle> dcInfDetalles) {
		this.dcInfDetalles = dcInfDetalles;
	}

}
